package org.toycode.logindemo.service;

import javax.ejb.EJBException;
import javax.ejb.Remote;
import org.toycode.logindemo.entity.SystemUser;

/**
 * This class provides the security relevant <em>remote</em> services.
 *
 * @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
 * @version 1.0.0.0, Aug 18, 2009
 */
@Remote
public interface SecurityServiceRemote {

    /**
     * Adds the specified user to system.
     * @param user the specified user
     * @throws EJBException
     */
    void addUser(final SystemUser user) throws EJBException;

    /**
     * Gets a user by the specified user name.
     * @param userName the specified user name
     * @return the user correspondings to the specified user name, if
     * not found, returns <code>null</code>
     * @throws EJBException 
     */
    SystemUser getUserByName(final String userName) throws EJBException;
}
